<?php 
namespace app\index\controller;
use app\index\controller\Common;
use app\Request;
use think\Db;

class Contact extends Common{
    public function index(){
        $ind_sub = Db::name('nav')->where('sid', 7)->select();
        $banner = Db::name('banner')->where('is_show', 1)->field('img_url,link_url')->limit(1)->find();
        $banner = empty($banner) ? null : $banner;

        $con = Db::name('config')->find();
        $this->assign('con',$con);
        $company = [
            'sub' => $ind_sub,
            'banner' => $banner,
        ];
        $this->assign('contact', $company);
        return $this->fetch('contact');
    }
}